import Taro from "@tarojs/taro";

import {getGlobalData, setGlobalData} from "../../../global.d";
import {toast} from "../../../utils";
import Envs from '../../../constant/envs'
const db = Taro.cloud.database();

export function addNewSign(data) {
  return db.collection("sign")
    .add({
    data
    })
    .then(res => {
      console.log(res);
      return true
    })
    .catch(err => {
      toast('创建签到失败，请重试');
      console.error(err);
      return false
    })
}

